package com.cainaer.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cainaer.product.domain.ProductLadder;
import com.cainaer.product.mapper.ProductLadderMapper;
import com.cainaer.product.service.IProductLadderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商品阶梯价格表 服务实现类
 * </p>
 *
 * @author Tina
 * @since 2020-09-11
 */
@Service
public class ProductLadderServiceImpl extends ServiceImpl<ProductLadderMapper, ProductLadder> implements IProductLadderService {

    @Autowired
    private ProductLadderMapper productLadderMapper;

    /**
     * 新增阶梯价格数据
     *
     * @param productLadder
     * @return
     */
    @Override
    public Integer insertProductLadder(ProductLadder productLadder) {
        return productLadderMapper.insert(productLadder);
    }

    /**
     * 编辑阶梯价格数据
     *
     * @param productLadder
     * @return
     */
    @Override
    public Integer editProductLadder(ProductLadder productLadder) {
        return productLadderMapper.updateById(productLadder);
    }
}
